Fixed porting errors 2/2.