Fix variable references