spawn/exit fix