Search and edit not working