Fixing XHR
adding proper scope to xhr requests