fixes #57, fixes #58, fixes #32