Fix for issues #5 and #9 works.