step 2 - correcting flags