Fixing --aggregate option to work correctly.