Attempted fix for removing last item only once.