Fixed a bug in the resizing window