You are reading from UART using GetChar() without checking or waiting for a character ready. This might return a 0x00 indicating that situation, but you do not react on that. Additionally you compare an unsigned with -1 and ignore that warning.
Thanks for the reply Bob, made the rookie mistake of using the 12.6/12.7 tx/rx pins which are shared by the kitprog. I just had to move them then it worked.