Fix for processing invalid caracters after intermediate bytes