Fix bug with session during deploy

Change-Id: Ic931b8f1d01eed43cbbcff29f8aceb80ae6931ee
Closes-Bug: #1303751