fix a bug in insertScore