fixed python3 errors