refine code for bug #194, use send messages for all msg array.