Fixed bug in activities controller.