Fix window position restore (fix #126)