#7 fixing NPE problem