Fixing ranking bug