Review fixes. Added test for both types of flags.