fixed minor bug in MessageFrameStreamWriter