Fix port undefined