resizing window bug fixed