fixing update NPE