fixed error message problems