Fix order of commands so that they actually work