Fixed a bug which caused an Array Index OOB.