nullpointerexception when not initialized + shutdown