The fix to issue #12 caused some exceptions that did not affect the results, but should be avoided. Also guarded some tracing