Fix working of error message.