NullPointerException fixed