fix resizing window