Fix security issues