fix new hsp calculation.