fix a bug for analog read