fixed the lost of the last item