bug fixes

Fixed error with misplaced variables solving the out of index errors. As
well as reversing the order so that highest count, rather than lowest
count, appear in the top 10s