Fixed an empty result and added a shell script for updating ranks.