Fix automatic flag setting.