Added flag handling to cmd_rally