checking script and state recover
fix up save