fixed porting errors 5/many