fix get allMessages bug