Fix some python3 errors.