fixed null pointer

I hope