nullpointerreference fixed