fixed the code for NIST MSQC v1.2