Fixed template listener.

[ci skip]