fixing serialRead bugs