Modified the method to use 'return' rather than 'abort' when the counter goes down to zero