Tried to fix it so that last item is also changed