Fixed issues in unit tests when running with xunit console runner.