fix endpoint lifecircle issue