Python3 compatibility update