Fixed functionality for deleting a tail node.