fixing javascript bug in aggregator service (this was fixed in test2.js, but the file name has since been changed to aggregatorService).