Corrected a nullpointer