Flag getting optimized