fixed more db errors