Fixed python3 errors