Fix order of instructions