Fix python 3 support

Closes #13