Don't keep the loop spinning if there is nothing to do