Nullpointer fix in MainActivity