fixed nullpointer.