bugfix: state_to_string (take 2)