Removed bug where the activities are not killed in the background.