applying @krisb's fix. (pending 'aggregate' patch)