Porting changes from islands-components/spin2