Add variables for custom script (bug fix)