Remove unnecessary nil checks
If ranks are equal set app with higher version to top