Bug Fixes

Changed the way the search functions work