Fixed double publishing of message