NPE fix for test runs.