NullPointerException fix.