Remove each addition of `_loadAgentsPromise = null;` and instead setup the following:

```
result.always(function () {
  _loadAgentsPromise = null;
}
```