fixes #19, fixes #20, fixes #23, fixes #24, fixes #25,