Fixes #10; fixes #4