This check should be *within* the previous if-block. The variable can only be 0 if it has been decremented.