Fix port registration