NPE fixed

NPE fixed