Spawn protection
Fixed index out of bounds exception