Fixed undefined variable from recent refactor. I probably should've done a test run before the last commit.