add a >= 0 guard on duration, fix unit tests to support