Added int conversion for py3 compatability