Fix NullPointerException