py3 support fixes #20