Merge "Fix possible NPE" into sc-v2-dev