Made resizing work.