corrected position problem on resizing windows