fixed a bug when searching the persistent store for checking if migration is necessary