fix null pointe exception #26