fix bug of npe