changed how script tags were inserted back into the document to fix a bug where dev blocks wouldn't get removed