Added if to prevent indexoutofarray on scoring
Fixed arrayoutofbounds for scoring