Fix issue where a variable were not defined

(causing notices)