Merge "Fix a crash caused by transaction" into sc-dev