Fixed command ordering bug.