Updated to work with the new server protocol