fixed a bug

messages were sent twice randomly, dunno why