diff --git a/src/app/authorisation.service.ts b/src/app/authorisation.service.ts
index 0eeda95a10d4bbbf538d30e7ea24b8df26e0a85e..ce21cbe744114af351c2cef723f517df19253846 100644
--- a/src/app/authorisation.service.ts
+++ b/src/app/authorisation.service.ts
@@ -31,7 +31,7 @@ export class AuthorisationService {
   public readyToNavigate: Subject<[Boolean,string]>;
   public progress: Subject<string>;
   // private keyCert: Subject<KeyCert>;
-  private backendURI: string;
+  public backendURI: string;
   public statusMsg: BehaviorSubject<string>;
   public agentContents: BehaviorSubject<any>;
   public keys: KeyCert[];
@@ -53,7 +53,7 @@ export class AuthorisationService {
                 this.sshAuthzServers = new BehaviorSubject<SshAuthzServer[]>([]);
                 this.loggedInAuthZ = new BehaviorSubject<SshAuthzServer[]>([]);
                 this.loggedOutAuthZ = new BehaviorSubject<SshAuthzServer[]>([]);
-                this.backendURI = environment.tesurl;
+                this.backendURI = '';
                 this.agentContents = new BehaviorSubject([]);
                 this.keys = [];
                 this.getSshAuthzServers();
diff --git a/src/app/tes.service.ts b/src/app/tes.service.ts
index 662bf7ad58b34b884492e20f351b6cc093a9fdc5..2f78fb03b532031bb40b689fc1c4cf0ec105b7ec 100644
--- a/src/app/tes.service.ts
+++ b/src/app/tes.service.ts
@@ -110,6 +110,7 @@ private loadLastApiServer() {
     }
     this.Base = this.apiserver.value.tes;
     this.twsproxy = this.apiserver.value.tws;
+    this.authorisationService.backendURI = this.Base;
     console.log('load succeeded');
 }
 private saveLastApiServer(s: APIServer) {
@@ -166,7 +167,9 @@ private saveLastApiServer(s: APIServer) {
    var lastjoblist: Job[] = this.joblist.value;
    var qjobids: any[] = [];
    var jobids: any[] = [];
-   var j: Job
+   var j: Job;
+   var newjob: Job;
+   var idx: number;
 
    for (j of jobquery) {
        qjobids.push(j.jobid);
@@ -174,6 +177,12 @@ private saveLastApiServer(s: APIServer) {
    for (j of lastjoblist) {
        if (qjobids.indexOf(j.jobid) != -1) {
            if (jobids.indexOf(j.jobid) == -1) {
+               idx = qjobids.indexOf(j.jobid)
+               newjob = jobquery[idx]
+               // These values in the job may change, but we need to keep using the old object
+               j.state  = newjob.state;
+               j.endtime = newjob.endtime;
+               j.batch_host = newjob.batch_host;
                joblist.push(j);
                jobids.push(j.jobid);
            }