fixed db connection class