fixes #35 (mostly)