Fixed indentation error in get_rank