prevent infinite loop when a listener also sends messages