fixed porting errors 2/many