AJAX search bugfix