Fix security in activities

Fix security in activities