fixed bug with multiple operations and message counting