Add volatile modifier to flag fields