added slashes where needed in XHR calls