Fixed python3 issues