flag fix, misc