arrayIndexOutBounds exception fixed.