Improve memorizing window's position