fixed db updating