Fix bug with ranking algorithm
Merge pull request #4 from rubenesc/fix-ranking-bug

Fix bug with ranking algorithm