Fixing DB issues