Fixed bug in error reporting with unicode text