Use "finish" event (not "end" event) when listening for completion of template rendering