added check for 0-duration trajectory