fixed cpu usage and setsid, now for real