fix port check giving reverse boolean