Fix schedule offset calculation