fixed unexpected restart
ps1 from template