handle invalid values for plug