Some fixes with search function in Engine class.