fixing some REST API and XML issues