Same mechanism as the v1 frontend. 