Fixed weird bug when running in parallel mode.