Use correct attributes when calculating size