Fixed java.lang.NullPointerException