Handle filter chain &  Fix security bug