Fixed init error when starting in console mode.