stop discovery on leave and improve doc