Minor fix of main script