Modifications to test for py3. bugs