fixed NPE in unit test