Fix Undefined variable: dg"