fixes #8, well, most of it. will close anyway.