Fixed a bug in top 10 functions