fix message panel javascript on ajax insert