Fix possible db issue