fixes specs for search function