fixed error with intervals