Fix autostart issue