made some changes to prevent win-messages in UnitTests