Added app exiting