fixed another risk of nullpointerexception...