     public var maximumDuration: NSTimeInterval = 0.0 {
         didSet {
             setNeedsDisplay()
-            reloadAllComponents()
+
+            (0..<numberOfComponents).forEach { (component) in
+                self.reloadComponent(component)
+            }
             
-
-            if maximumDuration > 60*60 {
+            if maximumDuration >= 60*60 {
                 selectRow(60*500, inComponent: 1, animated: false)
                 selectRow(60*500, inComponent: 2, animated: false)
-            } else if maximumDuration > 60 {
+            } else if maximumDuration >= 60 {
                 selectRow(60*500, inComponent: 1, animated: false)
             }
         }

    }
    
    internal var selectedDuration: NSTimeInterval {
        var selectedDuration = 0.0
        
        for index in 0..<numberOfComponents {
            if index == 0 && numberOfComponents == 3{
                selectedDuration += Double(selectedRowInComponent(index)*Int(pow(60.0, Double(numberOfComponents-1-index))))
            } else {
                selectedDuration += Double(selectedRowInComponent(index)%60*Int(pow(60.0, Double(numberOfComponents-1-index))))
            }
        }
        
        return selectedDuration
    }
}


    }
    
    public func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
        let componentPlaceValue = placeValueForComponent(component)
        
        let numberOfRows = min(Int(maximumDuration)/componentPlaceValue+1, 60)
        return numberOfRows < 60 ? numberOfRows : 60*1000
    }
}
