Fixed a bug in which messages sent to to server where being echoed multiple times