MDL-24678 - Fixed race condition on chat module