fixes #53, fixes #46, fixes #48