fixed loop for checkout