Fixed db issues.