Fix division to work in py3 and py2