Bug fixes in RegPerSM,RegPerBlock as per exact formulae in xls