Fix order of execution