Fixed running Ruby finalizers at halt.