improve security listener