Shouldn't this be the value that is assigned to iwqold (i.e. the value at the end of the routine).