Fixed the secured variables not being used
Merge pull request #2602 from LaurentGoderre/v4.0-secure-variable

Fixed the secured variables not being used