Bug fix #60

Working on #9 and #10