Fixed a couple more porting errors