Update to make it able to save last deployment id on an agent. The update is not yet fixed.