Changed the design of the server, and made it work