Fix in sim_state::get_next_state