Various fixes in the js for multi-backend

Yes, because this happens when we redisplay the backends.