Fixing DB stuff