Template events fix