porting motes changes to cor