Fixed an out-of-scope variable error

Silly me.