fix for segmentation fault in UIDatepicker