latest update & minor NPE fix