fixes #9
fixes #10
fixes #15
fixes #16