Verified that fixes #2
Analysis of issue #3