app now restarts properly