More script resref fixes