minor fixes for the ranking