modified search js
fixed db conflict