small fix to handle empty error string