Fix DB upgrade process

Fix Favorites not showing up at first when database is upgraded