Fix restarting of app