fixed unscoped variable typo

Just fixed a typo that leads to an unscoped variable.