Fixed lastTailPos to update on append/pop