Added logic to prevent bad score records being inserted into table