Fixed small null pointer case