Fix size calculation for iOS 7