Stop loop once no more tokens exist