fix an issue for autostart