fix_logic