Fixed issues with message ids.