Correctly check rank in sendAssignLeader