Bugfix: handle None values in aggregation script. Fix typo.