fixed db problem