removed the bug of resizing