Fix bug in interval-builder