Fixed bug in activity resource (using javascript ararys again!)