The search function should now display the results correctly