Fix invalid grep range.