Fix NullPointerException.