Stopping counter on zero