this fixes #9 and #10