fix bug in dedupEngine