Repair bug

Repair two bugs in Retrieve method.