Fixed issues with iteration on search. Fixed issue with search by id