Fix DB errors