fix for main_comp
all scripts working, ready for merge into MASTER