Changed parallel for loop schedule from static to dynamic.