Implemented sizeToFit to ensure correct frame size