Fixes to DB Maintenance