fix variable ref

This fixes an incorrect reference to a variable.