Added sorting stuff for topratio (dirty way).