fix bug in retrieve pet id