correction to pin counter