Fixes #26 and fixes #28