fixed resizing problems