fixes #8 and fixes #10