fix messages order bug