fix search and migration