Fixed resizing errors.