Change the order in which tasks are done when changing the environment