Modification to RS-232 reading logic