Fixes pertaining to secure function.