Fix error in sumScore function