fixed douplicated messages bug