better resizing support