fixed porting errors 4/many