Attempt to fix occasional crash on startup.