fix condition for using constant

In order to use constant for secure/unsecure port
Then this condition should also use it