Added optional callback for duplicate tags