Fixes #216

This supposes an overall improvement to the app performance when processing messages.