fix auto popup and need more test