Additional fixes to pass tests for python3