integrate tail listeners' lifecycle correctly