fixed bug in display of error message