Fix compile error with missing variable