Fix treefromschedule bug