Fix won't-shut-off bug