Fixes to dbupgrade library