fixing the search functionality based on Jesse Vaughan's observation regarding the pep_csrf field