Handled the case of multibyte record ending prematurely.