fixed double db connect