fixed some problems with autorun, fixed #782
Merge pull request #790 from waterbearlang/782_persist_autorun

fixed some problems with autorun, fixed #782