Uses more backported code from v2