                 return finishedOn
             }
             else {
-                return NSDate()
+                return taskViewController.result.endDate ?? NSDate()
             }
         }()
         
-        if (schedule.startedOn == nil) {
-            schedule.startedOn = taskViewController.result.results?.first?.startDate ?? schedule.finishedOn
-        }
+        schedule.startedOn = taskViewController.result.startDate ?? schedule.finishedOn
         
         // Send message to server
         SBAUserBridgeManager.updateScheduledActivity(schedule)


public class SBAActivityTableViewController: UITableViewController, SBASharedInfoController, ORKTaskViewControllerDelegate {
    
    var activities: [SBBScheduledActivity] = []
    var taskReferenceMap: [String : NSDictionary] = [:]
    
    override public func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        self.reloadData()
    }
    
    
    // MARK: Customizable implementations
    

    
    public func scheduledActivityAtIndexPath(indexPath: NSIndexPath) -> SBBScheduledActivity? {
        return activities[indexPath.row]
    }
    
    public func scheduledActivityForTaskViewController(taskViewController: ORKTaskViewController) -> SBBScheduledActivity? {
        return activities.findObject({$0.guid == taskViewController.taskRunUUID.UUIDString})
    }
    
    public func dequeueReusableCell(tableView: UITableView, indexPath: NSIndexPath) -> UITableViewCell {
