Fix the order of actions