Fixed db issue