Fixed bug in which the activities page would give errors