Fix port validation