Fix id resolution. Fix patch and helper