Fixed error in Aggregated.cpp which caused segfaults in Aggregated task