fixed missing error message bug