small fix in retrieve method