resizing now works ok