Fix security issues reported by the security audit