fixed the multiple orders problem