Fixed bug in error message processing.