added error checking to the problem area in MorhpoStream::readRestOfWord