Bug fixed (removing last element of a linked list)