fixed simple nullpointer exception