fixed db connect problem