Fixed the counter value not being shown correctly at resume