Fixed a crash on startup.