Several bugs fixed, a search agent should work OK