fixed CPVG plugin logic errors