js ajax search bugfix