Fixed local db issue