reset pin on error