Updated score error function.