more edits to fix incorrect flags