[#98]Add debug code to research cause, and attempted fix.