fix truncate
Merge branch 'fix_0319'
add window.close()