Fix DGW v1 and v2 architecture issues.