Fixed NPE
test