Fix up database