fixed displaying of errors