fix NPE in tests