Nullpointer fix