misc fixes to db tasks