Fixed window resizing bug.