fixing if condition for setting secret token