fixes #131, fixes #122, fixes #116, fixes #105, fixes #103, fixes #89, fixes #52