make possible to use restart with autostart and cookies