Fixing Repeat Flag