Fix potential crashes.