Fixed weird window resizing error.