added additional eos check

forgot to check for eos when actually reading the message content