Fix script, now it works