Fixed a bug on the order by score