fixed bug with scripts. pt7 worked perfectly with this code