Trying to fix duplicate search results problem