fix py3 test failures
add @wasade suggestions