another db fix, logging