Fix crash caused by spawn control