Fixes #45 and fixes #53