Fix up db