fix retrieved_at, add some coverage