bugfix: state_to_string
bugfix: state_to_string (take 2)