Fix wrong order of commands