Addresses issue of activity not being destroyed