Use boolean to quit loop.