added active message stats to profile and made thread safe again