fixed a bug when displaying error messages