use script and some GC fixes