fixes #46, fixes #47