bug fix in function Has Enough