Minor code fixes to Exiting UnitTests
Fix for https://github.com/TeamMentor/Master/issues/826