fix flags tests when parsing metadata