                 self.index = index
                 let hiddendID = self.configurations?.gethiddenID(index: self.index ?? -1)
                 self.scheduledetails = self.schedules?.readscheduleonetask(hiddenID: hiddendID)
-                globalMainQueue.async(execute: { () -> Void in
-                    self.scheduletabledetails.reloadData()
-                })
             } else {
                 self.index = nil
                 self.scheduledetails = nil
             }
+            globalMainQueue.async(execute: { () -> Void in
+                self.scheduletabledetails.reloadData()
+            })
         }
     }
 


    func dismiss_view(viewcontroller: NSViewController) {
        self.dismiss(viewcontroller)
        globalMainQueue.async(execute: { () -> Void in
            self.scheduletable.reloadData()
        })
    }
}


        self.selectedstart.isHidden = true
        self.startdate.dateValue = Date()
        self.starttime.dateValue = Date()
        self.reloadtabledata()
        self.delayWithSeconds(0.5) {
            self.enablemenuappbutton()
        }
