Changes for Python3 compatability