Fix the bug window resizing is failed.