Fix: group activities and projects even if non-contiguous