Clean up the order of advancedCommands