Added search, fixed crashing