Fixed out-of-range bug.