fixed error message not showing