Added another check to make sure counter > 0