Fixes #10 and fixes #11