Fix endless loop for equal start and end range values.