Fix bound out of range panic.
Merge branch 'YCC'