fixed fix_state