fixes #74, fixes #54, fixes #56