fixed porting errors 3/many