fixing some issues with python3