Fixed attachment loop's exit after 1