Fixed bug in time intersection test