fixed some issues in cSIR.c