some last minute fixes to db