Add missing range check.