fix the order of the commands