The server FINALLY WORKS
And now it behaves correctly too