NPE fix for test environment.