fixes #9 and fixes #10