Very odd behavior of Serial stream

after some tests I figured out that "delay" in the input string can be in any place... so might be exist only one solution to resolve this issue.. using timeout as you suggested or write my own timeRead function like in the Stream class