Fixed problem with using tuples as keys - tuples have to be compared against tuples