Fixed NPE that broke the tests.