Fixed a nullpointer