Fix the windows resize

Especially the missing var

fix #882