If each motor independently runs OK and without jitter, then I would investigate the possibility of the code itself being the cause. For instance, the while loop could get quite busy ... is it possible to check and process just one character at a time? If so, then the while loop could be replaced with "if" or switch / case statements to smooth out code execution timing.