Should fix issues #20 and #19