fixed nullpointerexception crash