fixed a bug on duplicate search entities