Fix logic in Executor

Thanks to David Christiansen for the hint!