Corrected Spawn Code