fix some interval bugs