fixing message on error