Fix bug in line scoring