fixed more db stuff