Fix bug that cased ArrayOutOfBounds on update line