Handling duplicates in the order queue