Fxed nullpointerexception