More fixes for undefined variable checks
Removed undefined variable references