fix bugs & support security check