Fixes #8 and fixes #9