fix overlay error for plotGate