fix capacity and id access issues