I don't have time to write a test for this before my flight. but I fixed
the bug and added a TODO for the test.  there are many scenarios we are
behind on filling tests for.