fix nullpointer
clean up