fixed nullpointerexception when reloading