NUllpointerException fix.