fixing bug with heads pointing to selves