fixing a few variable references