fixed db connecting