fix nullpointerexception