Fixed error in code accessing an array value.