Tiny refactor in SecApi