Fixing db issues.