fixes #12 and #15