Fixes to support build from dbmanage