fixed get_ML_states, hopefully