python3 division and integer fixes