fixes #11 and fixes #12