Fix for issues #10 and #11