regAgg fixed for JSON export