Merge pull request #645 from jskda/pull_request.unit_test_fixes

Unit test fixes