Updating server with Maurizio's code.