improve two listeners, fix issues after last merging