Added debug code to SMHA