Fixed flags check