Fixed bug where REST requests were consistently failing after a dozen requests