Fix app freeze from not finishing activity.