Merge "Fix Array Index out of bounds error." into oc-dev