Fixed ranking bugs