fixes #5, #10