Nullpointer fix

Should fix the nullpointer error once compiled
:pray: