Fixed a bug
Changed the order of commands