Fixed search function not using the correct field name