fixes #17 fixes #2