fixed bug in interval scan so that the stop position is not omitted