Minor changes to rank_callback