fixed bug with resizing windows