fix port validation