Fixed Error

Corrected Out-of-Bounds Error that could occur on rare occasions.