fixes #19, fixes #44