Fixes to Flags, FLAG Command, IF Command. Still requires further testing.