Fixed missing variable (caused by refactoring)