fixed #79. prevent null pointer exception when there is no address