Fix rank alignment