fixed removing the last item