minor bug in getrank fixed