fix nullpointerException