Fixes #28 and fixes #29