Fixed the ordering bug.