Fixes issues #19 & #20