corrected bug in main_global_comp