move restart out of template block