Fixes search function