Fix security flow

Fix security flow