Python2/3 compatibility update