Try to fix some panics