Fix script initialization