fix in displaying error message