Using flatten to get correct counts. Class macro callback is not included in callback 'chain' now.