Fixed exception if the rank string is empty