fix index range