Swap order of creating queue and parallel environment to fix crash.