fix a bug of orderBy