fix the rank