Fix the SecureStub implementation