fixed how preferredSize is adjusted for Frames