Fix local mode execution and concurrency issues