Added automatic restarting on 'Activity mode' changes