fix bug with socket and autostart