Fix some python3 problems