fixed some variable references