fixed problem nullpointerexception