Added fix for python 3 that cannot compare tuples with lists.