fixed bug with creating search