ordering bug fixes