Fix unit test and bug with ostream flags in Wiflycontrol