fix intermittent test failures.
Merge pull request #1009 from ecnahc515/fix_test_failures

fix intermittent test failures.