fixed double db issue