Added locks to activities