fix a bug on digital pin input setting