Ensure variables are defined

Change-Id: Iab1d36b0162c1d7a91cdd80ac36bbf338e7df61d