Corrected bug when using Ad Hoc Executor