fix auto resizing