Implement better resizing