Correct Looping

Fix Array Looping in AddHeadLast() and AddBodyLast()