Added support for before/after render