Fix empty cart re-adding last item due to resubmitting form