fix bugs in add_states_and_approx_relations