Fixed bug with zero length intervals