npe fixed. close #48