fixes #41, fixes #39, fixes #37, fixes #36, fixes #28