fixed close document