Fix some python3 issues