fixed tail spawning issues