Fix in creating and updating activities