fix nullPointException bug