Fixed all concurency issues.