fixed script variable ref