fixed HasCloseHandler issue