Fix up use of flags here