Fix some panics and cleanup die in stateinformed