Fix variable not always being defined.