fixes #39, fixes #42