Some database fixes.