fixed issue with singleton
server sends and receives messages now.