Fix id retrieval