Fix: Undefined variable

Fixes #240.
I'd like to open more PRs to inject dependencies instead of pulling them out of the purse of an old lady.