Fix warnings in SpawnScript