Fixing variables that are not set but called, adding null definitions