Fix port errors