Fixed an issue with restarting