Added Auto close of the activity when its view is closed