Fix port state.