Modify emptyCounter implementation.