Fix script scope