Fixed custom rank bug

Fixed custom rank bug