correct the handling of static variables in openMP