PaulS:
Your suggestion solved the problem
No, it masked the problem. The problem still exists.
Correct. As in the output of a GPS, there should be a terminating character in that string, like cr/lf or the like. That is why I recommended waiting for that character as a first choice.