Patch to make the implementation backwards compatible with v1.x

This was also necessary for modules to be reused in both front-end and backend.