Fix and run tests
Fix for python 3