Problem fixed. No more NPE.