Implement resizing.