Fixed error in scoring where it throws exception due to out of bounds