Fixed the counter opening overflow issue