Bug in paralell loop