fixes #20, fixes #10