Revert "fix port check giving reverse boolean"

This reverts commit da902ea6161c29b52678429506273dfea3be7f58.