I fixed the final part of the tail by making it compare to the previous item instead of itself. It still does the getting out of its outline tho