Fix db issue