Fix NPE in tester caused by recent refactoring