some fixes in the server to json list shares and in the test