Added Python2/3 joint compatibility