Fixes for GitHub issues #1 #2.