added additional fix for sh mode to account for spec inv