Added code to workaround fields that contain e.g. TreeMap and are not Comparable