typo in aggregate code