ownership check NPE fix