fixed db upgrade issue