Moved restart to the end, otherwise following commands fail due to unavailable