updated error messages properly