dont use variables that goes out of scope

Change-Id: Ica5f05e63bb811141314cc24f4f68be245f364f6