Fix some variable references