Fixed bugs for qc module