fix before listner is not triggered