Improve testing and debugging.  I have found a bug.