Apply @jacobg830 which fixed close alert