Fixed possible crash when no error message is available