fixed some python3 problems