Fix crashing during startup.