Fixes Python 3 support