Fixing #10 and #3