Fixed a state error message bug