Fixed bug in error message displaying.