Fixed bug where messages could duplicate