Removed a bug while drawing aggregation
formatting the code